home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Programmer Disk
/
The Programmer Disk (Microforum).iso
/
xpro
/
bc
/
pro16
/
gravity.h
< prev
next >
Wrap
Text File
|
1992-12-25
|
1KB
|
61 lines
#define MAX_PLANETS 10
#define MAX_PLAYERS 7
#define DEG2RAD 0.01745329252
#define MAX_PLANET_HITS 4
#define PLANET_OUTS 4
#define PLAYER_OUTS 3
int maxx,maxy ;
typedef struct
{
UWORD orgx,orgy ;
UWORD radius ;
UWORD density ;
float mass ;
UBYTE hits ;
UBYTE outs ;
} PLANET ;
PLANET planets[MAX_PLANETS] ;
typedef struct
{
UWORD orgx,orgy ;
float speed ;
float angle ;
UBYTE alive ;
UBYTE outs ;
} PLAYER ;
PLAYER players[MAX_PLAYERS] ;
typedef struct
{
float x,y ; /* current x and y coordinates */
float vx,vy ; /* current x and y velocities */
UBYTE hit ; /* hit something flag */
} TORPEDO ;
void init_screen(void) ;
void msg(UBYTE,char*) ;
void get_planets(void) ;
void create_planet(UBYTE) ;
void get_players(void) ;
void create_player(UBYTE) ;
UWORD dist(UWORD,UWORD,UWORD,UWORD) ;
void draw_ship (UWORD,UWORD,UWORD) ;
UBYTE get_inputs(void) ;
void show_paths(void) ;
UBYTE players_left(void) ;
void change_players(void) ;
void get_num(UWORD,float*) ;
void paint_screen(void) ;
void draw_planet(UBYTE) ;
void check_bounds (TORPEDO*,UBYTE) ;
void check_planets (TORPEDO*,UBYTE) ;
void check_ships (TORPEDO*,UBYTE) ;
UBYTE torps_left(void) ;
void explode(UWORD,UWORD) ;
void draw_compass(UWORD,UWORD,UWORD) ;